<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" th:href="@{/}+'plugins/dtree/dtree.css'">
    <link rel="stylesheet" th:href="@{/}+'plugins/dtree/font/dtreefont.css'">
    <style>
        .dtree-select-show {
            z-index: 9999;
        }
    </style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-row">
            <div class="layui-btn-group">
                                <button type="button" class="layui-btn " id="clearAllData" th:text="#{eq.Clearingdata}">清空业务数据</button>
                            </div>
            </div>
        </div>
    </div>
</div>

<script th:inline="none"></script>
<script>
    layui.extend({
        tableSelect: '{/}plugins/layuiplugins/tableSelect'
    });
    layui.extend({
        dtree: '{/}plugins/dtree/dtree' 
    });
    layui.use(['table','form','tableSelect','dtree'], function(){
        var table = layui.table,
            form = layui.form
            ,tableSelect = layui.tableSelect
            ,dtree = layui.dtree;
		$("#clearAllData").on("click",function(){
			layer.confirm('确定要清空数据吗?', {icon: 3, title:'提示'}, function(index){
                   axios.post('eqGoods/clearAllData').then(res=> {
                         if (res.data.code == 1) {
                             layer.msg(res.msg);
                         } else {
                             layer.close(index);
                             table.reload('haoCaiTable');
                         }
                   })
             });
		})
	
    });
</script>
</body>
</html>